﻿#ifndef CAMERADAHENG_H
#define CAMERADAHENG_H

#include "camera.h"

#include "GxIAPI.h"
#include "DxImageProc.h"

class CameraDaheng : public Camera
{
public:
    CameraDaheng(const std::string name);

    // Camera interface
public slots:
    virtual void initialize() override;
    virtual void openCamera() override;
    virtual void closeCamera() override;
    virtual void quit() override;
    virtual void readCameraParams() override;
    virtual void writeCameraParams(const std::string& camName, const CameraParams &cp) override;
    virtual void preProcessImage(const ImageInfo &imgInfo) override;
    virtual void triggerSoftware() override;
//    virtual void needReStart() override;

    // Camera interface
public:
    virtual bool isColor(int pixelFormat) override;
    virtual bool isMono(int pixelFormat) override;

    // Camera interface
public slots:
    virtual void setExposureTime(const std::string &camName, const FloatValue &value) override;
    virtual void setTriggerModeOff() override;
    virtual void setTriggerModeSoftware() override;

private:

    GX_EVENT_CALLBACK_HANDLE hCB;
    unsigned char* m_pBufferRGB;
    int64_t m_imgWidth;
    int64_t m_imgHeight;
    int64_t m_payLoadSize;
    int64_t m_nPixelColorFilter;

};

#endif // CAMERADAHENG_H
